package chap7;

public class StringTest{
    String myString1;
    String myString2=new String();
    String myString3="It is a string";

    void print(){
        System.out.println("My strig after declaration="+myString1);
        System.out.println("My strig after declaration="+myString2);
        System.out.println("My strig after declaration="+myString3);
        }

    public static void main(String arg[]){
		char [] chars = {'s','t','u','d','y',' ','j','a','v','a','!'};

		String s1 = new String(chars);
		String s2 = new String(s1);

		System.out.println(s1);
		System.out.println(s2);

        StringTest st=new StringTest();
        st.print();
        }
    }